home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.programming / comp.sys.amiga.programmer_22749_000010.msg < prev    next >
Encoding:
Internet Message Format  |  1994-11-27  |  2.9 KB

  1. Path: etek.chalmers.se!chalmers.se!sunic!lunic!eru.mt.luth.se!enterpoop.mit.edu!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!spool.mu.edu!agate!stanford.edu!rutgers!ub!dsinc!bagate!cbmvax!peter
  2. From: peter@cbmvax.commodore.com (Peter Cherna)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: BOOPSI and Styleguide question
  5. Message-ID: <37371@cbmvax.commodore.com>
  6. Date: 30 Nov 92 23:56:33 GMT
  7. References: <1est9mINN4rg@uni-paderborn.de>
  8. Reply-To: peter@cbmvax.commodore.com (Peter Cherna)
  9. Organization: Commodore-Amiga, Inc.  West Chester, PA.
  10. Lines: 51
  11.  
  12. In article <1est9mINN4rg@uni-paderborn.de> fillg1@uni-paderborn.de (Michael Illgner) writes:
  13. >Hi,
  14. >
  15. >I have some questions concerning the BOOPSI gadgets and images. Is it legal to
  16. >change the colors of for example a LEFTARROW image by copying the screens DrawInfo
  17. >and supplying a new Pen array ? I want to interchange the colors of a button gadget,
  18. >so in its normal stage it should be grey an in selected state blue. Is this styleguide
  19. >conform ? 
  20.  
  21. You can't supply different pen arrays for different states, so this won't
  22. work.  The system arrows are really designed to operate in a window border.
  23. The system really needs a set of arrows for 'inside the window' use.
  24.  
  25. >Next question, I want to write an palette requester for Kick3.0, therefor I need a
  26. >button which is filled with the selected color and I want the normal 3D-look frame around
  27. >it. How can I accomplish this ? Is it possible to render a BOOPSI gadget using 2 images
  28. >like the interior filled rectangle and a frame ?
  29.  
  30. Boopsi gadgets get GM_RENDER methods, in which they can do all kinds of
  31. rendering.  This can include actual rendering and/or passing IM_DRAW to
  32. a gadget's image, which, if boopsi, can also do all kinds of rendering.
  33.  
  34. The boopsi frameiclass image class supports exactly what you need.  In
  35. your OM_NEW method for your gadget, you can create a frame with NewObject()
  36. on frameiclass, with IA_FrameType of FRAME_BUTTON.  This will give you
  37. a filled frame, over which you can render your text.  For example:
  38.  
  39.     case GM_RENDER:
  40.  
  41.         ...    /* Get RP, etc */
  42.         /* Now draw the frame, with state=IDS_NORMAL or IDS_SELECTED */
  43.         DrawImageState( rp, myframeimage, 0, 0, state, drawinfo );
  44.         PrintIText( rp, labeltext, 0, 0 );
  45.  
  46. >Is it possible to get the images or even the gadgets from the gadtools gadgets ? This
  47. >would be the key for a uniform look of the gadgets.
  48.  
  49. frameiclass provides you the ability to get GadTools-styled frames.
  50.  
  51. NB: Under 2.0, only the thin frame (FRAME_DEFAULT) is supported by
  52. frameiclass.  The GadTools-style FRAME_BUTTON and the GadTools string-gadget
  53. FRAME_RIDGE are new for V39.
  54.  
  55. >                            Michael
  56.  
  57.      Peter
  58. --
  59. Peter Cherna, User Interface Development Group, Commodore-Amiga, Inc.
  60. {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
  61. My opinions do not necessarily represent the opinions of my employer.
  62. "Opinions enlarged to show detail"